<template>
<view>
    <jyf-parser  :html="comContent" gesture-zoom lazy-load ref="article" selectable
                show-with-animation use-anchor @error="error" @imgtap="imgtap" @linkpress="linkpress" @parse="parse" @ready="ready">
        <view class=" text-center">正在加载数据...</view>
    </jyf-parser>
</view>
</template>

<script>
import parser from '@/components/jyf-parser/jyf-parser';
    export default {


        props:{
          content:{
              type:String
          }
        },
        // HBuilderX 2.5.5 及以上可以不需要
        components: {
            'jyf-parser': parser
        },
        watch:{
           content:{
               handler(newVal){
                   this.comContent = newVal
               }
           }
        },
        data(){
           return {
               comContent:''
           }
        },

        created() {
        },
        methods: {
            parse(e) {
                console.log('parse finish', e);
            },
            ready(e) {
                console.log('ready', e);
            },
            imgtap(e) {
                console.log('imgtap', e);
            },
            linkpress(e) {
                console.log('linkpress', e);
            },
            error(e) {
                console.error(e);
            }
        }
    }
</script>

<style scoped>

</style>
